/*
 * Copyright (c) 2017, cxy7.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.b3log.solo.dao.repository;

import java.util.List;
import java.util.Map;

import org.json.JSONObject;

/**
 * None repository implementation.
 *
 * @author <a href="http://cxy7.com">XyCai</a>
 * @version 1.2.0.1, Sep 4, 2016
 */
public final class NoneRepository implements Repository {

	/**
	 * Constructs a none repository with the specified name.
	 *
	 * @param name
	 *            the specified name
	 */
	public NoneRepository(final String name) {
	}

	@Override
	public String add(final JSONObject jsonObject) throws RepositoryException {
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public void update(final String id, final JSONObject jsonObject) throws RepositoryException {
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public void remove(final String id) throws RepositoryException {
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public JSONObject get(final String id) throws RepositoryException {
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public Map<String, JSONObject> get(final Iterable<String> ids) throws RepositoryException {
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public boolean has(final String id) throws RepositoryException {
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public JSONObject get(final Query query) throws RepositoryException {
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public List<JSONObject> select(final String statement, final Object... params) throws RepositoryException {
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public List<JSONObject> getRandomly(final int fetchSize) throws RepositoryException {
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public long count() throws RepositoryException {
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public long count(final Query query) throws RepositoryException {
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public String getTableName() {
		return "None Repository";
	}

	/*
	 * @Override public Transaction beginTransaction() { throw new
	 * UnsupportedOperationException("Not supported yet."); }
	 * 
	 * @Override public boolean hasTransactionBegun() { return false; }
	 */

	@Override
	public boolean isWritable() {
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public void setWritable(final boolean writable) {
		throw new UnsupportedOperationException("Not supported yet.");
	}

}
